<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>订餐管理后台</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../Res/LayUI/css/layui.css" media="all">
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	    
<script type="text/javascript" src="../../Res/JS/jquery-1.10.2.js"></script>
<script src="../../Res/JS/common.js"></script>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div><a href="../Pages/index.html" class="layui-logo">馋了吗后台管理</a></div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a id="tupian" href="javascript:;"></a></li>
				
				<li class="layui-nav-item"><a href="../login.html">注销</a></li>
			</ul>
		</div>
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll" id="module">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				
		 <ul class="layui-nav layui-nav-tree"  lay-filter="test">
	        <li class="layui-nav-item layui-nav-itemed">
	          <a class="" href="javascript:;">订单管理</a>
	          <dl class="layui-nav-child">
	            <dd><a href="javascript:locUrl('../../pages/other/afterIndent.html');">订单管理</a></dd>
	          </dl>
	        </li>
	        
	        <li class="layui-nav-item layui-nav-itemed">
	          <a class="" href="javascript:;">菜品管理</a>
	          <dl class="layui-nav-child">
	            <dd><a href="javascript:locUrl('../../pages/food/food2.html');">菜品管理</a></dd>
	          </dl>
	        </li>

				
			</div>
		</div>
		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px;">
				<iframe src="../../Res/images/2.png" frameborder="0"
					id="demoAdmin" style="width: 100%;"></iframe>
			</div>
			
			<div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->

    </div>
			
		</div>
		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© WinnerClass have good team spirit,but not everyone.
		</div>
	</div>
	<script src="../../Res/LayUI/layui.js" charset="utf-8"></script>
	<script>
		layui.use('element', function(){
			  var element = layui.element;
		});
		layui.use('layer', function(){
		  var $ = layui.$
		  ,setIframe = function(){
		    var height = $(window).height()-70;
		    $('#demoAdmin').height(height);
		  };
		  
		  setIframe();
		  $(window).on('resize', setIframe);
		});
		function locUrl(url){
			$("#demoAdmin").attr("src",url);
		}
		
		
		
		url=getRootPath()+"ManagerAction/findManaModule";
		//var userName="nihao";
		var str=null;
		$.ajax({
			async:false,
			Type:"POST",
			dataType:"JSON",
			url:url,
			success:function(msg){
				
				for(var i=0; i<msg.length; i++){

					str+="<li class='layui-nav-item'><a href='javascript:;''>"+msg[i].modName+"</a>"+
							"<dl class='layui-nav-child'>"+
								"<dd>"+
									"<a href='javascript:locUrl(\""+msg[i].url+"\");'>"+msg[i].modName+"</a>"+
								"</dd>"+
							"</dl>"+
						"</li>";
				}
				
				$("#module").append("<ul class='layui-nav layui-nav-tree site-demo-nav' >"+str+"</ul>");
				//alert("+++"+str);
			},
			error:function(msg){
				/* alert("失败"); */
			}  
		});

	</script>
</body>
</html>
